// @ts-ignore
import {ref, watch} from "vue";

export default function useTitle(initValue: string) {
  const titleRef = ref(initValue)

  watch(titleRef, (newValue:string) => {
    document.title = newValue
  }, {
    // immediate: true
  })
  return titleRef
}
